package com.xmtlxx.common.sms.aliyun;

import com.xmtlxx.common.utils.StringUtils;
import lombok.Getter;

@Getter
public enum SmsTemplateCode {
    TASK_NOTICE("TASK_NOTICE","新订单提醒","SMS_493225319"),
    DISPATCH_NOTICE("DISPATCH_NOTICE","订单指派通知","SMS_493290313"),
    PICK_UP_NOTICE("PICK_UP_NOTICE","上门取件通知","SMS_493425324"),
    WARE_HANDOVER_NOTICE("WARE_HANDOVER_NOTICE","物品交接完成通知","SMS_493340311"),
    SIGN_NOTICE("SIGN_NOTICE","订单签收通知","SMS_493205283"),
    VIEWING_NOTICE("VIEWING_NOTICE","阅证申请通知","SMS_493410313"),
    YC_VAILD_CODE("YC_VAILD_CODE", "云仓登陆验证码", "SMS_493320246"),
    DISPOSAL_NOTICE("DEAL_NOTICE","处置申请通知","SMS_493340314"),
    EXTEND_NOTICE("EXTEND_NOTICE","归还延期通知","SMS_493230324");
    private final String SMS_VALUE;
    private final String SMS_NAME;
    private final String SMS_CODE;

    SmsTemplateCode(String SMS_VALUE, String SMS_NAME, String SMS_CODE) {
        this.SMS_VALUE = SMS_VALUE;
        this.SMS_NAME = SMS_NAME;
        this.SMS_CODE = SMS_CODE;
    }

    public static SmsTemplateCode getSmsCode(String str) {
        for (SmsTemplateCode value : values()) {
            if (StringUtils.contains(str, value.getSMS_VALUE())) {
                return value;
            }
        }
        throw new RuntimeException("'SmsType' not found By " + str);
    }
}
